package sicau.carManager.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import sicau.carManager.entity.Message;
import sicau.carManager.mapper.MessageMapper;
import sicau.carManager.service.MessageService;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ITcz
 * @since 2021-02-05
 */
@Service
public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message> implements MessageService {

    @Autowired
    MessageMapper messageMapper;

    @Override
    public Integer selectCountByLicensePlate(String licensePlate){
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("License_plate_number", licensePlate);
        return messageMapper.selectCount(queryWrapper);
    }
}
